package com.my.controller;

import com.my.BusinessProvider;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = BusinessProvider.class)
public class BusinessControllerTest {
    BusinessController businessController;

    @Autowired
    public void setBusinessController(BusinessController businessController) {
        this.businessController = businessController;
    }

    @Test
    public void testSendEmailMessage() {
        System.out.println(businessController.sendEmailMessage("1286856721@qq.com"));
    }

    @Test
    public void testLoginByPassword() {
        System.out.println(businessController.loginByPassword("admin", "admin"));
    }

}
